package main

import (
	"github.com/garyburd/redigo/redis"
	"time"
)

var redisPool *redis.Pool

func init() {
	redisPool = &redis.Pool{
		Dial: func() (conn redis.Conn, e error) {
			return redis.Dial("tcp", "192.168.0.35:6379")
		},
		TestOnBorrow:    nil,
		MaxIdle:         4,
		MaxActive:       8,
		IdleTimeout:     time.Second * 120,
		Wait:            true,
		MaxConnLifetime: 0,
	}
}

func main() {

	conn := redisPool.Get()
	defer conn.Close()

	redisPool.Close()
}
